//
// Created by lenovo on 2024/2/9.
//

#include "Vector.h"
#include <iostream>
template <>
double magnitude<Vector>(Vector v){
    return v.getValue();
}

template <>
Vector normalized<Vector> (Vector v){
    if (v.getValue() == 0)
        throw std::logic_error("Cannot normalized a Vector whose length is ZERO");
    return {normalized(v.getDirection()) , 1};
}